home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
4_0
/
DONALDXC
/
FILECLOS.C
< prev
next >
Wrap
Text File
|
1990-05-01
|
971b
|
44 lines
/********************************/
/* File: FileClose.c */
/* */
/* XCMD to access the file mgr */
/* call FSClose */
/* Paramters: */
/* param0 = file reference from */
/* the fileopen xcmd */
/* ---------------------------- */
/********************************/
#include <MacTypes.h>
#include <OSUtil.h>
#include <MemoryMgr.h>
#include <FileMgr.h>
#include <ResourceMgr.h>
#include <pascal.h>
#include <string.h>
#include "HyperXCmd.h"
#include "HyperUtils.h"
pascal void main( paramPtr )
XCmdBlockPtr paramPtr;
{
short refnum;
char str[256];
/* convert the refnum to a usable form */
HLock( paramPtr->params[0] );
ZeroToPas( paramPtr, *(paramPtr->params[0]), &str );
HUnlock( paramPtr->params[0] );
refnum = (short)StrToNum( paramPtr, &str );
/* Normally we should check the result */
/* code but it won't kill us to ignore */
/* the reslt of a close file call */
if ( FSClose(refnum) )
;
paramPtr->returnValue = 0L;
}